package com.lhj.library.common.enums;

import lombok.Getter;

/**
 * 图书借出归还状态枚举
 */
@Getter
public enum IsDisabledFlagEnum {

    DISABLED(0, "禁用"),
    UN_DISABLED(1, "正常");


    public int code;

    public String desc;

    IsDisabledFlagEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static IsDisabledFlagEnum getByCode(int codeVal) {
        for (IsDisabledFlagEnum resultCodeEnum : IsDisabledFlagEnum.values()) {
            if (resultCodeEnum.code == codeVal) {
                return resultCodeEnum;
            }
        }
        return null;
    }


}
